//File: character.h
//Author: George Puckett
//Description: ideas for the base character class and a couple of inherited classes
#include "point2d.h"
#include <iostream>
#include <vector>

using namespace std;
#ifndef CHARACTER_H
#define CHARACTER_H

enum {
       speedUpgrade1=1, //a simple (if techlevel<x) check could be used with X being one of these names, for each of them.
       capacityUpgrade1,// for instance, if techlevel<capacityUpgrade1, player could be prevented from getting speed2 or radius upgrade
       speedUpgrade2,
       radiusUpgrade1
     };


class Character{
protected:
  unsigned int owner; // this should hold the Player.id() value of the player who owns the character.
  unsigned short moveSpeed,carryingCap; //all of our units will have a movement speed, and they all can 'carry' something.
				     //maybe the surveyors can 'carry' the locations of resources.
  point2d location;
	unsigned short techLevel; //this can be used to track the status of 'upgrades' such as enhanced capacity or whatever
			 //we can make the upgrades require  that basic upgrades MUST be purchased before better ones.
  unsigned short lumber,ore,food;

public:
	Character();
	Character(const point2d&, const unsigned int&);
	~Character();
	
   friend istream& operator>>(istream&, Character&);
	friend ostream& operator<<(ostream&, Character&);
	friend istream& operator>>(istream&, vector<Character>&);
	friend ostream& operator<<(ostream& out, vector <Character>& character);

  unsigned short movement(); //movement speed getter function should be named something a little bit more lexically understandable..
	    	 //moveSpeed() would be the easiest thing to use but would introduce forgetting-the-parentheses errors.
  point2d getLocation();
  short getLocation(const char&);

	void setLocation(const short&, const short&);
  void setLocation(const point2d&);
  void setFood(const unsigned short&);
  void setOre(const unsigned short&);
  void setLumber(const unsigned short&);
   void setMoveSpeed(const unsigned short&);
   void setTechLevel(const unsigned short&);
   void setCarryingCap(const unsigned short&);
  void setOwner(const unsigned int&);
  unsigned short getFood();
  unsigned short getOre();
  unsigned int getOwner();
  unsigned short getLumber();
};

#endif
